#ifndef VERTICALSTACKLAYOUT_H
#define VERTICALSTACKLAYOUT_H

#include <QObject>
#include <QList>
#include <QPointer>
#include <QDebug>

#include "../VisBaseClasses/visbaselayout.h"

class VisBaseElement;

class VerticalStackLayout : public VisBaseLayout
{
    Q_OBJECT
public:
    VerticalStackLayout(QObject *parent = 0);
    VerticalStackLayout(QList< QPointer< VisBaseElement > > elements, QObject *parent = 0);
    //VerticalStackLayout( const VerticalStackLayout& other );

    void setStartEltIdx( int newStartEltIdx );
    void setStartYPos( float newStartYPos );
    void setGapBetweenElements( float newGapBetweenElements );
    void setElementsCentered( bool newElementsCentered );
    void resetStartEltIdx();

signals:
    void trackProgress(int stepsComplete);
    void finished();
    void error( QString err );

public slots:
    void process();

protected:
    int startEltIdx;
    float startYPos;
    float gapBetweenElements;
    bool elementsCentered;

private:
    void init();
    void layoutCenteredElements();
    void layoutTopElements();

    
};

#endif // VERTICALSTACKLAYOUT_H
